package com.sghd.candy.module.box.facade;

import com.sghd.common.socket.anno.InBody;
import com.sghd.common.socket.anno.InSession;
import com.sghd.common.socket.anno.SocketCommand;
import com.sghd.common.socket.anno.SocketModule;
import com.sghd.pojo.candy.box.enums.KeyType;
import com.sghd.pojo.candy.box.vo.BoxKeyVo;

import java.util.List;
import java.util.Map;

import static com.sghd.candy.utils.SocketEnum.BOX_KEY_LIST;
import static com.sghd.candy.utils.SocketEnum.BOX_OPEN;
import static com.sghd.candy.utils.SocketEnum.BOX_OPEN_TEACH;
import static com.sghd.common.socket.session.SessionKeys.IDENTITY;

/**
 * @author Allen
 * @date 2018/12/25
 */
@SocketModule()
public interface BoxFacade {
    /**
     * 普通开箱
     * @param playerId
     * @param keyType
     * @param openCount
     * @return
     */
    @SocketCommand(BOX_OPEN)
    List<Map> openBox(@InSession(IDENTITY)long playerId, @InBody("keyType")KeyType keyType, @InBody("openCount")Integer openCount);

    /**
     * 教程开箱
     * @param playerId
     * @param keyType
     * @return
     */
    @SocketCommand(BOX_OPEN_TEACH)
    List<Map> openBox(@InSession(IDENTITY)long playerId, @InBody("keyType")KeyType keyType);

    /**
     * 打开宝箱界面
     * @param playerId
     * @return
     */
    @SocketCommand(BOX_KEY_LIST)
    BoxKeyVo boxKeyList(@InSession(IDENTITY)long playerId);
}
